package com.alex.j2se.collection;

import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 测试Map，包括HashMap、LinkedHashMap、TreeMap
 * ConcurrentHashMap
 * @author alex
 *
 */
public class MapTest {

	public static void main(String[] args) {
		Map<String,String> map = new LinkedHashMap<String,String>();
		map.put("key1", "val1");
		map.put("key2", "val2");
		map.put("key3", "val3");
		map.put("key1", "val1_1");
		System.out.println(map.toString());
		System.out.println(map.keySet().toString());
	}
	
	public static Map<String, String> addMap(Map<String, String> map) {
		map.put("a", "value1");
		map.put("c", "value1");
		map.put("b", "value1");
		map.put("c", "value1");
		return map;
	}
	
	
	
}
